package org.example.bobofish.user.application.facade.map;

import org.example.bobofish.user.application.facade.entity.GetUserRightsListRequest;
import org.example.bobofish.user.application.facade.entity.GetUserRightsListResponse;
import org.example.bobofish.user.domain.model.UserRightsInfoModel;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : yuxiong
 * @date : 2025/6/17
 */
@Mapper
public interface UserFacadeMapper {
    UserFacadeMapper INSTANCE = Mappers.getMapper(UserFacadeMapper.class);

    default GetUserRightsListResponse convert(List<UserRightsInfoModel> userRightsInfoModelList) {
        GetUserRightsListResponse response = new GetUserRightsListResponse();
        response.setUserRightsInfoModelList(userRightsInfoModelList);
        return response;
    }

    default GetUserRightsListRequest convert(String userId) {
        GetUserRightsListRequest request = new GetUserRightsListRequest();
        request.setUserId(userId);
        return request;
    }
}
